package view.console;

import java.util.ArrayList;
import java.util.Iterator;
import model.Artist;
import model.ArtistModel;
import model.Model;
import controller.Controller;
import model.Artist;

/**
 * Class for view an Artist-information
 */
public class ArtistView implements ItemView {

    private Model artists = new ArtistModel();

    public Model getModel() {
        return artists;
    }
    
    public void showItems(ArrayList items) {
        if (items.size() == 0) {
            System.out.println("Не найдено ни одного исполнителя");
            return;
        }
        System.out.println("№\tИсполнитель");
        Iterator it = items.iterator();
        int i = 1;
        while (it.hasNext()) {
            System.out.println(i + "\t" + (Artist) it.next());
            i++;
        }
        System.out.println("--------------------------------------------------");
    }
}
